1 /* 2 3 Boost Software License - Version 1.0 - August 17th, 2003 4 5 Permission is hereby granted, free of charge, to any person or organization 6 obtaining a copy of the software and accompanying documentation covered by 7 this license (the "Software") to use, reproduce, display, distribute, 8 execute, and transmit the Software, and to prepare derivative works of the 9 Software, and to permit third-parties to whom the Software is furnished to 10 do so, all subject to the following: 11 12 The copyright notices in the Software and this entire statement, including 13 the above license grant, this restriction and the following disclaimer, 14 must be included in all copies of the Software, in whole or in part, and 15 all derivative works of the Software, unless such copies or derivative 16 works are solely in the form of machine-executable object code generated by 17 a source language processor. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 DEALINGS IN THE SOFTWARE. 26 27 */ 28 29 module derelict.purple.theme_manager; 30 31 import derelict.glib.gtypes; 32 import derelict.glib.glibconfig; 33 import derelict.purple.theme; 34 import derelict.purple.theme_loader; 35 36 extern (C): 37 38 alias void function (_PurpleTheme*) PTFunc; 39 alias _PurpleThemeManager PurpleThemeManager; 40 alias _PurpleThemeManagerClass PurpleThemeManagerClass; 41 42 struct _PurpleThemeManager 43 { 44 GObject parent; 45 } 46 47 struct _PurpleThemeManagerClass 48 { 49 GObjectClass parent_class; 50 } 51 52 53 version(Derelict_Link_Static) 54 { 55 extern( C ) nothrow 56 { 57 GType purple_theme_manager_get_type(); 58 void purple_theme_manager_init(); 59 void purple_theme_manager_uninit(); 60 void purple_theme_manager_refresh(); 61 PurpleTheme* purple_theme_manager_find_theme(const(gchar)* name, const(gchar)* type); 62 void purple_theme_manager_add_theme(PurpleTheme* theme); 63 void purple_theme_manager_remove_theme(PurpleTheme* theme); 64 void purple_theme_manager_register_type(PurpleThemeLoader* loader); 65 void purple_theme_manager_unregister_type(PurpleThemeLoader* loader); 66 void purple_theme_manager_for_each_theme(PTFunc func); 67 PurpleTheme* purple_theme_manager_load_theme(const(gchar)* theme_dir, const(gchar)* type); 68 } 69 } 70 else 71 { 72 extern( C ) nothrow 73 { 74 alias da_purple_theme_manager_get_type = GType function(); 75 alias da_purple_theme_manager_init = void function(); 76 alias da_purple_theme_manager_uninit = void function(); 77 alias da_purple_theme_manager_refresh = void function(); 78 alias da_purple_theme_manager_find_theme = PurpleTheme* function(const(gchar)* name, const(gchar)* type); 79 alias da_purple_theme_manager_add_theme = void function(PurpleTheme* theme); 80 alias da_purple_theme_manager_remove_theme = void function(PurpleTheme* theme); 81 alias da_purple_theme_manager_register_type = void function(PurpleThemeLoader* loader); 82 alias da_purple_theme_manager_unregister_type = void function(PurpleThemeLoader* loader); 83 alias da_purple_theme_manager_for_each_theme = void function(PTFunc func); 84 alias da_purple_theme_manager_load_theme = PurpleTheme* function(const(gchar)* theme_dir, const(gchar)* type); 85 } 86 87 __gshared 88 { 89 da_purple_theme_manager_get_type purple_theme_manager_get_type; 90 da_purple_theme_manager_init purple_theme_manager_init; 91 da_purple_theme_manager_uninit purple_theme_manager_uninit; 92 da_purple_theme_manager_refresh purple_theme_manager_refresh; 93 da_purple_theme_manager_find_theme purple_theme_manager_find_theme; 94 da_purple_theme_manager_add_theme purple_theme_manager_add_theme; 95 da_purple_theme_manager_remove_theme purple_theme_manager_remove_theme; 96 da_purple_theme_manager_register_type purple_theme_manager_register_type; 97 da_purple_theme_manager_unregister_type purple_theme_manager_unregister_type; 98 da_purple_theme_manager_for_each_theme purple_theme_manager_for_each_theme; 99 da_purple_theme_manager_load_theme purple_theme_manager_load_theme; 100 } 101 }